package com.tedu.bill1;

/**
 * Author：毕龙
 * Date: 2024/4/11 20:16
 */
public class CreditCard {
    private String cardNo;//行用卡卡号
    private String password;//行用卡密码

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setPassword(String password) {
        if (password.length() == 6) {
            this.password = password;
        } else {
            this.password = "000000";
        }
    }

    public void setPassword(String password, Student stu, Student stu1) {
        //条件判断
        if (stu.name.equals(stu1.name)) {
            setPassword(password);
        }
    }

    public String getPassword() {
        return password;
    }
}
